<?php if (isset($_SERVER['HTTP_USER_AGENT']) && !strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6')) echo '<?xml version="1.0" encoding="UTF-8"?>'. "\n"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" xml:lang="<?php echo $lang; ?>">
<head>
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<link rel="stylesheet" type="text/css" href="portal/view/theme/default/stylesheet/stylesheet.css" />
<link rel="stylesheet" type="text/css" href="portal/view/theme/default/stylesheet/stickybox.css" />
<?php foreach ($styles as $style) { ?>
<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>
<script type="text/javascript" src="portal/view/javascript/jquery/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="portal/view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="portal/view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />
<script type="text/javascript" src="portal/view/javascript/jquery/ui/external/jquery.cookie.js"></script>
<script type="text/javascript" src="portal/view/javascript/jquery/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<link rel="stylesheet" type="text/css" href="portal/view/javascript/jquery/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
<link rel="stylesheet" type="text/css" href="portal/view/javascript/jquery/tooltip/jquery.tooltip.css" />
<!--[if IE]>
<script type="text/javascript" src="portal/view/javascript/jquery/fancybox/jquery.fancybox-1.3.4-iefix.js"></script>
<![endif]--> 
<script type="text/javascript" src="portal/view/javascript/jquery/tabs.js"></script>
<script type="text/javascript" src="portal/view/javascript/jquery/jquery.dimensions.js"></script>
<script type="text/javascript" src="portal/view/javascript/jquery/tooltip/jquery.tooltip.js"></script>
<script type="text/javascript" src="portal/view/javascript/common.js"></script>
<?php foreach ($scripts as $script) { ?>
<script type="text/javascript" src="<?php echo $script; ?>"></script>
<?php } ?>
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="portal/view/theme/default/stylesheet/ie7.css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="portal/view/theme/default/stylesheet/ie6.css" />
<script type="text/javascript" src="portal/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
<script type="text/javascript">
DD_belatedPNG.fix('#logo img');
</script>
<![endif]-->
<?php echo $google_analytics; ?>
</head>
<body>
<div id="stickyBox" class="pages">
	<div id="header" style="z-index:100; height: 0px">
		<div id="welcome">
			<?php if (!$logged) { ?>
			<?php echo $text_welcome; ?>
			<?php } else { ?>
			<?php echo $text_logged; ?>
			<?php } ?>
		</div>
		
		<?php if (count($languages) > 1) { ?>
		  <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
		    <div id="language">
		      <?php foreach ($languages as $language) { ?>
		      &nbsp;<img src="image/flags/<?php echo $language['image']; ?>" alt="<?php echo $language['name']; ?>" title="<?php echo $language['name']; ?>" onclick="$('input[name=\'language_code\']').attr('value', '<?php echo $language['code']; ?>').submit(); $(this).parent().parent().submit();" />
		      <?php } ?>
		      <input type="hidden" name="language_code" value="" />
		      <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
		    </div>
		  </form>
		<?php } ?>
		
		<?php if (count($currencies) > 1) { ?>
		  <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
		    <div id="currency"><?php echo $text_currency; ?>: 
		      <?php foreach ($currencies as $currency) { ?>
		      <?php if ($currency['code'] == $currency_code) { ?>
		      <?php if ($currency['symbol_left']) { ?>
		      <a title="<?php echo $currency['title']; ?>"><b><?php echo $currency['symbol_left']; ?></b></a>
		      <?php } else { ?>
		      <a title="<?php echo $currency['title']; ?>"><b><?php echo $currency['symbol_right']; ?></b></a>
		      <?php } ?>
		      <?php } else { ?>
		      <?php if ($currency['symbol_left']) { ?>
		      <a title="<?php echo $currency['title']; ?>" onclick="$('input[name=\'currency_code\']').attr('value', '<?php echo $currency['code']; ?>').submit(); $(this).parent().parent().submit();"><?php echo $currency['symbol_left']; ?></a>
		      <?php } else { ?>
		      <a title="<?php echo $currency['title']; ?>" onclick="$('input[name=\'currency_code\']').attr('value', '<?php echo $currency['code']; ?>').submit(); $(this).parent().parent().submit();"><?php echo $currency['symbol_right']; ?></a>
		      <?php } ?>
		      <?php } ?>
		      <?php } ?>
		      <input type="hidden" name="currency_code" value="" />
		      <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
		    </div>
		  </form>
		<?php } ?>
		
		<?php if (count($this->city->getCities()) > 1) { ?>
			<form id="frm_current_city" action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
				<div id="city" class="">
					<div class='heading'>
						<a>
							<?php echo $this->city->getName();?>
						</a>
					</div>
					<div class="content">
						<ul style="margin-left: -10px">
						<?php foreach ($this->city->getCities() as $current_city_id => $city_info){?>
							<li>
								<?php if($current_city_id == $this->city->getCityId()){?>
									<a class="current"><?php echo $city_info['name'];?></a>
								<?php } else {?>
									<a onclick="$('input[name=\'current_city_id\']').attr('value', '<?php echo $current_city_id; ?>').submit(); $('#frm_current_city').submit();"><?php echo $city_info['name'];?></a>
								<?php }?>
							</li>
						<?php }?>
						</ul>
					</div>
					<input type="hidden" name="current_city_id\" value="" />
		      		<input type="hidden" name="redirect" value="<?php echo $redirect; ?>" />
				</div>
	      	</form>
		<?php } ?>
	</div>
</div>
<div id="container">
<div id="header">
  <?php if ($logo) { ?>
  <div id="logo"><a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" /></a></div>
  <?php } ?>
  
  <div class="links">
  	<a href="<?php echo $wishlist; ?>" id="wishlist_total"><?php echo $text_wishlist; ?></a><a href="<?php echo $account; ?>"><?php echo $text_account; ?></a><a href="<?php echo $cart; ?>"><?php echo $text_cart; ?></a><a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a></div>
</div>
<div id="menu">
  <ul>
    <li style="z-index: 1000">
    	<a href="<?php echo 'javascript:return false;'; ?>">Nhà hàng</a>
    	
    	<div style="padding-bottom:20px;">
    		<ul>
  				<?php foreach ($options as $option) { ?>
	    			<li>
	    				<h4><span style="color:#FFFFFF">
		    				<b><?php echo $option['name']; ?>:</b>
	    				</span></h4>
	    				<div>
					        <?php if ($option['type'] == 'image') { ?>
					        <div id="header-option-<?php echo $option['option_id']; ?>" class="option">
					            <div id="container" style="overflow:auto; width:400px;margin:0px; background-color:#B8B8B8">
					              <?php foreach ($option['option_value'] as $option_value) { ?>
					              	<div style="margin:2px; float:left;width:<?php echo $this->config->get('config_image_restaurant_option_width') + 15;?>px;height:35px;">
						              	<label for="option_value_<?php echo $option_value['option_value_id'];?>">
						              		<a href="<?php echo $option_value['href'];?>">
								                <img title="<?php echo $option_value['name']; ?> (<?php echo $option_value['total_restaurant']; ?>)" style="vertical-align:middle" src="<?php echo $option_value['image']; ?>"/>
							                </a>
						                </label>
						                <br/>
					                </div>
					              <?php } ?>
					            </div>
					        </div>
					        <?php } ?>
					        <script type="text/javascript">
					        $('#header-option-<?php echo $option['option_id']; ?> img').tooltip({
					        	track: true,
					        	delay: 0,
					        	showURL: false,
					        	showBody: " - ",
					        	fade: 1
					        });
					        </script>
				        </div>
			        </li>
		        <?php } ?>
    		</ul>
    	</div>
    </li>
    <li>
    	<a href="javascript:return false;"><?php echo $text_news;?></a>
    	<div>
    		<ul>
    			<?php foreach ($news_types as $news_type){?>
    			<li>
    				<a href="<?php echo $this->url->link('news/type','type_id=' . $news_type['type_id']); ?>"><?php echo $news_type['name'];?></a>
    			</li>
    			<?php }?>
    		</ul>
    	</div>
    </li>
    <li>
    	<a href="<?php echo '#'; ?>">Cùng mua</a>
    </li>
    <li>
    	<a href="<?php echo '#'; ?>">Hỏi đáp</a>
    </li>
    <li>
    	<a href="<?php echo '#'; ?>">Hỗ trợ</a>
    </li>
    <li style="float:right;z-index: 1000;">
    	<a style="padding:0px; margin-top:5px">
		    <?php if ($filter_name) { ?>
		    <input type="text" name="filter_name" value="<?php echo $filter_name; ?>" />
		    <?php } else { ?>
		    <input style="margin: 3px;" type="text" name="filter_name" value="<?php echo $text_search; ?>" onclick="this.value = '';" onkeydown="this.style.color = '#000000';" />
		    <?php } ?>
		    <img src="portal/view/theme/default/image/button-search-criterial.png" id="button-search" style="vertical-align:middle"/>
		    <script type="text/javascript"><!--
		    	$('#button-search').click(function(){
			    	if($('#menu input[name=\'filter_name\']').val() == '<?php echo $text_search; ?>'){
			    		$('#menu input[name=\'filter_name\']').val('');
			    	}
					    	
		    	});
		    //-->
		    </script>
		</a>
		<div>
			<a href="<?php echo $search; ?>"><?php echo $text_advanced_search; ?></a>
		</div>
    </li>
  </ul>
</div>
<div id="notification"></div>
